package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: Home
 * Date: 26/9/13
 * Time: 10:49 PM
 * To change this template use File | Settings | File Templates.
 */
public class User
{
    private String userName;
    private String password;
    private String name;
    private String mailId;
    private String contactNumber;

    User(String temporaryUserName, String temporaryPassword, String temporaryName, String temporaryMailId, String temporaryContactNumber)
    {
        userName = temporaryUserName;
        password = temporaryPassword;
        name = temporaryName;
        mailId = temporaryMailId;
        contactNumber = temporaryContactNumber;
    }

    public boolean validateCredentials(String temporaryUserName, String temporaryPassword)
    {
        if ((userName.equals(temporaryUserName)) & (password.equals(temporaryPassword)))
        {
            return true;
        }
        return false;
    }

    public void displayUserDetails()
    {
        System.out.println("  Name: " + name);
        System.out.println("  MailID: " + mailId);
        System.out.println("  Contact Number: " + contactNumber);
    }
}
